Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call to logger #11603

Merged
merged 2 commits into from
Oct 4, 2018
Merged

Fix call to logger #11603

merged 2 commits into from
Oct 4, 2018

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 3, 2018

Argument 2 passed to OC\\Log::info() must be of the type array, string given, called in \/var\/www\/html\/nextcloud\/apps\/theming\/lib\/ImageManager.php on line 120

public function info(string $message, array $context = []);

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added bug 3. to review Waiting for reviews labels Oct 3, 2018
@kesselb kesselb added this to the Nextcloud 15 milestone Oct 3, 2018
@@ -117,7 +117,7 @@ public function getImage(string $key, bool $useSvg = true): ISimpleFile {
$pngFile = $folder->newFile($key . '.png');
$pngFile->putContent($finalIconFile->getImageBlob());
} catch (\ImagickException $e) {
$this->logger->info('The image was requested to be no SVG file, but converting it to PNG failed.', $e->getMessage());
$this->logger->info('The image was requested to be no SVG file, but converting it to PNG failed.', [$e->getMessage()]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should add it to the message otherwise it's just lost. Could you add it to the message itself by string concatenation?

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 3, 2018
@rullzer rullzer merged commit 3c42510 into master Oct 4, 2018
@rullzer rullzer deleted the bugfix/noid/fix-wrong-call-for-logger branch October 4, 2018 05:40
@MorrisJobke
Copy link
Member

@danielkesselberg Mind to do a backport to the stable branches 13 and 14?

@kesselb kesselb mentioned this pull request Oct 4, 2018
@kesselb
Copy link
Contributor Author

kesselb commented Oct 4, 2018

Backport for stable14 in #11610. getImage is not present in stable13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants